﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified"
    targetNamespace="http://www.dotnetage.com/XML/Schema/page"
    elementFormDefault="qualified"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:wgt="http://www.w3.org/ns/widgets"
    xmlns:s="http://www.dotnetage.com/XML/Schema/page"
>
  <xs:import namespace="http://www.w3.org/ns/widgets" />
  <xs:import namespace="http://www.dotnetage.com/XML/Schema/widget" />
  <xs:element name="page">
    <xs:complexType>
      <xs:all>
        <xs:element name="id" type="xs:string"  minOccurs="0" maxOccurs="1" />
        <xs:element name="title" type="xs:string"  minOccurs="0" maxOccurs="1" />
        <xs:element name="description" type="xs:string"  minOccurs="0" maxOccurs="1"  />
        <xs:element name="keywords" type="xs:string"  minOccurs="0" maxOccurs="1"  />
        <xs:element name="link" type="xs:string"  minOccurs="0" maxOccurs="1"  />
        <xs:element name="icon" type="xs:string"  minOccurs="0" maxOccurs="1"  />
        <xs:element name="image" type="xs:string"  minOccurs="0" maxOccurs="1"  />
        <xs:element name="data"  type="xs:string"  minOccurs="0" maxOccurs="1"  />
        <xs:element name="layout"  type="xs:string"  minOccurs="0" maxOccurs="1"  />
        <xs:element name="pages" maxOccurs="1" minOccurs="0">
          <xs:complexType>
            <xs:sequence>
              <xs:element ref="s:page"  maxOccurs="unbounded" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="widgets" maxOccurs="1" minOccurs="0">
          <xs:complexType>
            <xs:sequence>
              <xs:element ref="wgt:widget"  maxOccurs="unbounded" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:all>
      <xs:attribute name="target" type="s:targets" use="optional" />
      <xs:attribute name="anonymous"  type="xs:boolean" default="true" use="optional"/>
      <xs:attribute name="showInMenu"  type="xs:boolean" use="optional" default="true"/>
      <xs:attribute name="static"  type="xs:boolean" use="optional" default="false"/>
      <xs:attribute name="shared"  type="xs:boolean" use="optional" default="false"/>
      <xs:attribute name="href"  type="xs:string" use="required"/>
    </xs:complexType>
  </xs:element>
  <xs:simpleType name="targets">
    <xs:restriction base="xs:string">
      <xs:enumeration value="_self" />
      <xs:enumeration value="_blank" />
      <xs:enumeration value="_top" />
      <xs:enumeration value="_parent" />
    </xs:restriction>
  </xs:simpleType>
</xs:schema>
